{extend name="Index/index" /}
{block name="table"}
	<!-- END SIDEBAR -->
	<!-- BEGIN CONTENT -->
	<div class="page-content-wrapper">
		<div class="page-content" style=" min-height: 700px;">
			<!-- BEGIN SAMPLE PORTLET CONFIGURATION MODAL FORM-->
			<div class="modal fade" id="portlet-config" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
				<div class="modal-dialog">
					<div class="modal-content">
						<div class="modal-header">
							<button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
							<h4 class="modal-title">Modal title</h4>
						</div>
						<div class="modal-body">
							 Widget settings form goes here
						</div>
						<div class="modal-footer">
							<button type="button" class="btn blue">Save changes</button>
							<button type="button" class="btn default" data-dismiss="modal">Close</button>
						</div>
					</div>
					<!-- /.modal-content -->
				</div>
				<!-- /.modal-dialog -->
			</div>
			<!-- /.modal -->
			<!-- END SAMPLE PORTLET CONFIGURATION MODAL FORM-->
			<!-- BEGIN STYLE CUSTOMIZER -->
			<div class="theme-panel hidden-xs hidden-sm">
				<!-- <div class="toggler">
				</div> -->
				<div class="toggler-close">
				</div>
				<div class="theme-options">
					<div class="theme-option theme-colors clearfix">
						<span>
							 THEME COLOR
						</span>
						<ul>
							<li class="color-black current color-default" data-style="default">
							</li>
							<li class="color-blue" data-style="blue">
							</li>
							<li class="color-brown" data-style="brown">
							</li>
							<li class="color-purple" data-style="purple">
							</li>
							<li class="color-grey" data-style="grey">
							</li>
							<li class="color-white color-light" data-style="light">
							</li>
						</ul>
					</div>
					<div class="theme-option">
						<span>
							 Layout
						</span>
						<select class="layout-option form-control input-small">
							<option value="fluid" selected="selected">Fluid</option>
							<option value="boxed">Boxed</option>
						</select>
					</div>
					<div class="theme-option">
						<span>
							 Header
						</span>
						<select class="header-option form-control input-small">
							<option value="fixed" selected="selected">Fixed</option>
							<option value="default">Default</option>
						</select>
					</div>
					<div class="theme-option">
						<span>
							 Sidebar
						</span>
						<select class="sidebar-option form-control input-small">
							<option value="fixed">Fixed</option>
							<option value="default" selected="selected">Default</option>
						</select>
					</div>
					<div class="theme-option">
						<span>
							 Sidebar Position
						</span>
						<select class="sidebar-pos-option form-control input-small">
							<option value="left" selected="selected">Left</option>
							<option value="right">Right</option>
						</select>
					</div>
					<div class="theme-option">
						<span>
							 Footer
						</span>
						<select class="footer-option form-control input-small">
							<option value="fixed">Fixed</option>
							<option value="default" selected="selected">Default</option>
						</select>
					</div>
				</div>
			</div>
			<!-- END STYLE CUSTOMIZER -->
			<!-- BEGIN PAGE HEADER-->
			<div class="row">
				<div class="col-md-12">
					<!-- BEGIN PAGE TITLE & BREADCRUMB-->
					<h3 class="page-title">
					站内消息
					</h3>
					<ul class="page-breadcrumb breadcrumb">
						<!-- <li class="btn-group">
							<button type="button" class="btn blue dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" data-delay="1000" data-close-others="true">
							<span>
								Actions
							</span>
							<i class="fa fa-angle-down"></i>
							</button>
							<ul class="dropdown-menu pull-right" role="menu">
								<li>
									<a href="#">
										Action
									</a>
								</li>
								<li>
									<a href="#">
										Another action
									</a>
								</li>
								<li>
									<a href="#">
										Something else here
									</a>
								</li>
								<li class="divider">
								</li>
								<li>
									<a href="#">
										Separated link
									</a>
								</li>
							</ul>
						</li> -->
						<li>
							<i class="fa fa-home"></i>
							<a href="{:url('index/index/index')}">
								Home
							</a>
							<i class="fa fa-angle-right"></i>
						</li>
						<!-- <li>
							<a href="#">
								Extra
							</a>
							<i class="fa fa-angle-right"></i>
						</li> -->
						<li>
							<a href="{:url('index/Inbox/index')}">
								站内消息
							</a>
						</li>
					</ul>
					<!-- END PAGE TITLE & BREADCRUMB-->
				</div>
			</div>
			<div class="row inbox" style="height: 100%;">
				<div class="col-md-2">
					<ul class="inbox-nav margin-bottom-10">
						<li class="compose-btn">
							<a href="{:url('index/Inbox/mail')}" data-title="Compose" class="btn green">
								<i class="fa fa-edit"></i> 写邮件
							</a>
						</li>
						<li class="compose-btn">
							<a href="{:url('index/Inbox/notice')}" data-title="Compose" class="btn green">
								<i class="fa fa-edit"></i> 发布公告
							</a>
						</li>
						<li class="inbox_">
							{if $num == 0}
							<a href="{:url('index/Inbox/index')}" class="btn" data-title="Inbox">
								 收件箱
							</a>
							<b></b>
							{else /}
							<a href="{:url('index/Inbox/index')}" class="btn" data-title="Inbox">
								 收件箱(<?php echo $num;?>)
							</a>
							<b></b>
							{/if}
						</li>
						<li class="draft">
							{if $num2 == 0}
							<a class="btn" href="{:url('index/Inbox/checknotice')}" data-title="Notice">
								 系统消息
							</a>
							<b></b>
							{else /}
							<a class="btn" href="{:url('index/Inbox/checknotice')}" data-title="Notice">
								 系统消息(<?php echo $num2;?>)
							</a>
							<b></b>
							{/if}
						</li>
						<li class="sent">
							<a class="btn" href="{:url('index/Inbox/sent')}" data-title="Sent">
								 已发送
							</a>
							<b></b>
						</li>
						<li class="trash">
							<a class="btn" href="{:url('index/Inbox/trash')}" data-title="Trash">
								 垃圾箱
							</a>
							<b></b>
						</li>
						
					</ul>
				</div>

				<div class="col-md-10">
					<form class="inbox-compose form-horizontal" id="fileupload" action="{:url('index/Inbox/send')}" method="POST" enctype="multipart/form-data">
						
						<div class="inbox-form-group mail-to" >
							<label class="control-label">收件人:</label>
							<div class="controls controls-to">
								<input type="text" class="form-control" name="to" id="tags" required="" >
							</div>
						</div>

						<!-- <script src="/static/assets/scripts/jquery-ui.js"></script> -->
						<script type="text/javascript">
						
						</script>
						
						<div class="inbox-form-group">
							<label class="control-label">标题:</label>
							<div class="controls">
								<input type="text" class="form-control" name="subject" required="" value="转发：{$mailinfo['mail_title']}">
							</div>
						</div>
						<div class="inbox-form-group">
							<label class="control-label">分类:</label>
							<select name="type" class="form-control-static">
							<option value="1">上传通知</option>
							<option value="2">管理制度</option>
							<option value="3">知识分享</option>
							<option value="4">系统帮助</option>
							</select>
						</div>
						
						<div class="inbox-form-group">
							<div>
							    <script id="editor" type="text/plain" ></script>
							</div>
						</div>

						<!--  -->
					    <script type="text/javascript" charset="utf-8" src="/static/assets/scripts/ueditor.config.js"></script>
					    <script type="text/javascript" charset="utf-8" src="/static/assets/scripts/ueditor.all.min.js"> </script>
        				<!-- <button onclick="getContentTxt()">获得内容</button> -->
					   
						<script type="text/javascript">
							var ue = UE.getEditor('editor');
							//对编辑器的操作最好在编辑器ready之后再做
							ue.ready(function() {
							    //设置编辑器的内容
							    ue.setContent('<br><br><br><p>------------------ 原始邮件 ------------------</p><div style="font-size: 12px;background:#efefef;padding:8px;"><div><p>发件人: "{$fj}";</p></div><div><p>发送时间: {$mailinfo['create_time']} </p></div><div><p>收件人: "{$_SESSION['think']['username'][0]['user_name']}";</p></div><div><p>主题: {$mailinfo['mail_title']}</p></div></div><span>{$mailinfo['mail_content']}</span>');
								$('.rewrite').css("background-color","#CCCCCC");
							    UE.getEditor('editor').focus();

							    //获取html内容，返回: <p>hello</p>
							});
							// function getContentTxt() {
					  //        	var arr = [];
						 //        arr.push("使用editor.getContentTxt()方法可以获得编辑器的纯文本内容");
						 //        arr.push("编辑器的纯文本内容为：");
						 //        arr.push(UE.getEditor('editor').getContentTxt());
						 //        alert(arr.join("\n"));
					  //   	}
						</script>
						<!--  -->
						
						
						<div class="inbox-compose-btn">
							<button class="btn blue"><i class="fa fa-check"></i>发送</button>
							<!-- <button class="btn close-btn" onclick="location='http://www.jstree.com'">关闭</button> -->
						</div>
					</form>
				</div>
			</div>
		</div>
	</div>

	<!-- END CONTENT -->
</div>
<!-- END CONTAINER -->
<!-- BEGIN FOOTER -->
<div class="footer">
	<div class="footer-inner">
		 2014 &copy; Metronic by keenthemes.
	</div>
	<div class="footer-tools">
		<span class="go-top">
			<i class="fa fa-angle-up"></i>
		</span>
	</div>
</div>
	<link rel="stylesheet" type="text/css" href="/static/assets/css/pages/inbox.css" />
	<link href="/static/assets/css/jquery-ui.css" rel="stylesheet">
	<script src="/static/assets/scripts/jquery-ui.js"></script>
	<!-- <script src="/static/assets/plugins/jquery-1.10.2.min.js" type="text/javascript"></script> -->
	<link href="/static/assets/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"/>
<!-- <link href="/static/assets/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"/> -->
<!-- <link href="/static/assets/plugins/uniform/css/uniform.default.css" rel="stylesheet" type="text/css"/> -->
<!-- END GLOBAL MANDATORY STYLES -->
<!-- BEGIN PAGE LEVEL STYLES -->
<link rel="stylesheet" type="text/css" href="/static/assets/plugins/bootstrap-select/bootstrap-select.min.css"/>
<link rel="stylesheet" type="text/css" href="/static/assets/plugins/select2/select2.css"/>
<link rel="stylesheet" type="text/css" href="/static/assets/plugins/select2/select2-metronic.css"/>
<link rel="stylesheet" type="text/css" href="/static/assets/plugins/jquery-multi-select/css/multi-select.css"/>
<!-- BEGIN THEME STYLES -->
<!-- <link href="/static/assets/css/style-metronic.css" rel="stylesheet" type="text/css"/> -->
<!-- <link href="/static/assets/css/style.css" rel="stylesheet" type="text/css"/> -->
<!-- <link href="/static/assets/css/style-responsive.css" rel="stylesheet" type="text/css"/> -->
<!-- <link href="/static/assets/css/plugins.css" rel="stylesheet" type="text/css"/> -->
<!-- <link href="/static/assets/css/themes/default.css" rel="stylesheet" type="text/css" id="style_color"/> -->
<!-- <link href="/static/assets/css/custom.css" rel="stylesheet" type="text/css"/> -->
<!-- <script src="/static/assets/plugins/jquery-migrate-1.2.1.min.js" type="text/javascript"></script> -->
<!-- <script src="/static/assets/plugins/bootstrap/js/bootstrap.min.js" type="text/javascript"></script> -->
<script src="/static/assets/plugins/bootstrap/js/bootstrap2-typeahead.min.js" type="text/javascript"></script>
<!-- <script src="/static/assets/plugins/bootstrap-hover-dropdown/bootstrap-hover-dropdown.min.js" type="text/javascript"></script> -->
<!-- <script src="/static/assets/plugins/jquery-slimscroll/jquery.slimscroll.min.js" type="text/javascript"></script>
<script src="/static/assets/plugins/jquery.blockui.min.js" type="text/javascript"></script>
<script src="/static/assets/plugins/jquery.cokie.min.js" type="text/javascript"></script> -->
<!-- <script src="/static/assets/plugins/uniform/jquery.uniform.min.js" type="text/javascript"></script> -->
<!-- END CORE PLUGINS -->
<!-- BEGIN PAGE LEVEL PLUGINS -->
<script type="text/javascript" src="/static/assets/plugins/bootstrap-select/bootstrap-select.min.js"></script>
<script type="text/javascript" src="/static/assets/plugins/select2/select2.min.js"></script>
<!-- END PAGE LEVEL PLUGINS -->
<!-- BEGIN PAGE LEVEL SCRIPTS -->
<script type="text/javascript" src="/static/assets/plugins/jquery-multi-select/js/jquery.multi-select.js"></script>
<script src="/static/assets/scripts/core/app.js"></script>
<script src="/static/assets/scripts/custom/components-dropdowns.js"></script>
	
	<!-- <script src="/static/assets/external/jquery/jquery.js"></script> -->
	<!-- <script>
	jQuery(document).ready(function() {       
	   // initiate layout and plugins
	   App.init();
	   Inbox.init();
	});
	</script> -->
	<!-- <script>
		$('.close-btn').onclick(function(){

		})
	</script> -->
<!-- END JAVASCRIPTS -->
<script>
		$(function(){
			$('.inbox').addClass("active");
		});
</script>

</body>
<!-- END BODY -->
</html>

{/block}